import axios from '@/utils/axios'
import moment from "moment";

export function getEmpPosition(params) {
  return axios({
    url: '/EmployeePosition/page',
    method: 'get',
    data: params
  })
}

export function getPositionList(params) {
  return axios({
    url: '/Position/list',
    method: 'post',
    data: params
  })
}

export function addEmpPosition(params) {
  return axios({
    url: '/EmployeePosition/add',
    method: 'post',
    data: params
  })
}

export function updatePosition(params) {
  return axios({
    url: '/Position/update',
    method: 'post',
    data: params
  })
}

export function getEmpPositionList(params) {
  return axios({
    url: '/EmployeePosition/getEmpPositionList',
    method: 'post',
    data: params
  })
}

export function deletePosition(params) {
  return axios({
    url: '/Position/deleteOne',
    method: 'post',
    data: params
  })
}

export function updateEmpPosition(params) {
  return axios({
    url: '/EmployeePosition/update',
    method: 'post',
    data: params
  })
}

export function deleteEmpPosition(params) {
  return axios({
    url: '/EmployeePosition/delete',
    method: 'post',
    data: params
  })
}

export function updateState(params) {
  return axios({
    url: '/Position/updateState',
    method: 'post',
    data: params
  })
}

export function searchPosition(params) {
  return axios({
    url: '/Position/search',
    method: 'get',
    data: params
  })
}

export function getEmpPositionSearch(params) {
  return axios({
    url: '/EmployeePosition/search',
    method: 'get',
    data: params
  })
}

export function getCheckTree(params) {
  return axios({
    url: '/Position/getCheckTree',
    method: 'post',
    data: params
  })
}
